<template>
    <div class="log_box">
        <p class="log_bntx">{{ bntx_text }}  <el-button text  class="moreBtn" @click='moreBtn'>更多+</el-button></p>
        <div class="log_conter" v-for="(item,index) in  notice_log" :key="index">
        {{index+1}}. {{ item.title }}<span class="time"  >{{formatDate(item.create_time) }}</span>
        </div>
    </div>
    
  </template>
 <script setup>
 import { useRouter,useRoute,} from "vue-router";
 import moment from 'moment'
 import {
   formatDate,
 } from "@/utils/utils.js";
 import { $post, $get } from "@/api/Api.js";
 import { Picture } from "@element-plus/icons-vue";
 import { ElMessage } from "element-plus";
 import { ref, watch, computed, onMounted } from "vue";
 import storageHelper from "@/libs/StorageHelper";
 let router = useRouter();
 let route = useRoute();
 let user_group = storageHelper.getGroupValue();
 let mode_names = ref([]);
 let notice_log = ref([]);
 let bntx_text = ref('公告');
 let uesr_names = ref('');
 let getNoticeList=()=>{
  let params={
    size: 10,
    page: 1,
    like: 0,
    orderby: 'create_time desc'
  }
   $get("/api/notice/get_list", params).then((res) => {
     notice_log.value =res.result.list
   });
 }
 let moreBtn=()=>{
  router.push('./notice/table')
 }
  onMounted(()=>{
      getNoticeList()
  })

  </script>
  
  <style  scoped lang='less'>
      .log_box{
       overflow-y: auto;
        .log_bntx{
          height: 40px;
          text-align: center;
          font-size: 18px;
          font-weight: 700;
        }
       }
      .log_conter{
        width: 80%;
        color: #141414;
        line-height: 30px; 
      }
      .moreBtn{
        position:absolute;
        right:20px;
      }
      .time{
        display: inline-block;
        float: right;
        left: 10px;
        font-size: 14px;
      }
      .hs{
        width: 220px;
      }
  
  </style>